import Cookies from 'js-cookie'

const TokenKey = 'SESSION'
const AuthToken = 'AuthToken'
const RefreshToken = 'RefreshToken'

export function getToken() {
  // return Cookies.get(TokenKey)
  return localStorage.getItem(AuthToken)
}

export function getRefreshToken() {
  return localStorage.getItem(RefreshToken)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  localStorage.removeItem(AuthToken)
  localStorage.removeItem(RefreshToken)
  // return Cookies.remove(TokenKey)
}

export function cleanToken() {
  return localStorage.clear()
  // return Cookies.clean()
}
